using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.IO;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;
using System.Xml.Serialization;


namespace DEFAULT{

public partial class Default : ICallbackEventHandler
{
 private string callbackScriptBlock = String.Empty;
 public string CallbackScriptBlock
 {
  get
  {
   return callbackScriptBlock;
  }
 }
 public void Page_Load(object sender, System.EventArgs e)
 {
  FillMostPopularSearches();
  callbackScriptBlock = this.GetCallbackEventReference(this, "query", "fillAutoComplete", "context", "onError");
 }
public string RaiseCallbackEvent(string query)
{
 List<string> results = popularSearches.FindAll(delegate(string s)
 {
  return s.StartsWith(query);
 });
 StringBuilder sb = new StringBuilder();
 foreach (string result in results)
 {
  sb.Append(result);
  sb.Append(',');
 }
 sb.Append(' ');
 return sb.ToString();
}
 private List<string> popularSearches = new List<string>();
 private void FillMostPopularSearches()
 {
  popularSearches.AddRange(new string[] { "amazon", "ask jeeves", "argos", "adaware", "aol", "ad aware", "amazon.com", "aim express", "aol.com", "american airlines" });
  popularSearches.AddRange(new string[] { "best buy", "bbc", "bbc news", "bank of america", "baby names", "blockbuster", "bestbuy", "british airways", "bed bath and beyond", "barnes and noble" });
  popularSearches.AddRange(new string[] { "cnn", "currency converter", "circuit city", "costco", "cars", "currys", "cingular", "comet", "christmas", "cnn.com" });
  popularSearches.AddRange(new string[] { "dictionary", "dell", "dictionary.com", "dixons", "disney", "drudge report", "dogs", "desperate housewives", "debenhams", "delta airlines" });
  popularSearches.AddRange(new string[] { "ebay", "election results", "expedia", "espn", "e bay", "ebay.com", "easyjet", "eminem", "electoral college", "election" });
  popularSearches.AddRange(new string[] { "firefox", "fox news", "free games", "ford", "food network", "fedex", "free ringtones", "free e cards", "free music downloads", "flowers" });
  popularSearches.AddRange(new string[] { "games", "google", "gmail", "google toolbar", "gap", "guitar tabs", "game", "google.com", "gta san andreas", "gomez web star" });
  popularSearches.AddRange(new string[] { "hotmail", "hotmail.com", "halo 2", "home depot", "half life 2", "http", "hp", "harry potter", "hmv", "holiday inn" });
  popularSearches.AddRange(new string[] { "ikea", "ipod", "imdb", "internet explorer", "itunes", "images", "indian railways", "index", "itv", "inland revenue" });
  popularSearches.AddRange(new string[] { "jokes", "jobs", "john lewis", "john kerry", "java", "jessica simpson", "jc penny", "jojo", "jet blue", "jcpenny" });
  popularSearches.AddRange(new string[] { "kazaa", "kelly blue book", "kmart", "kazaa lite", "kohls", "kelkoo", "kinkos", "ken jennings", "kazza", "kerry" });
  popularSearches.AddRange(new string[] { "lyrics", "lowes", "limewire", "lavasoft", "launch", "love poems", "lindsay lohan", "lands end", "love", "linksys" });
  popularSearches.AddRange(new string[] { "mapquest", "msn", "maps", "map quest", "music", "msn messenger", "movies", "microsoft", "msn.com", "msnbc" });
  popularSearches.AddRange(new string[] { "news", "nokia", "new york times", "nfl", "nintendo ds", "nbc", "nissan", "neopets", "national lottery", "need for speed underground 2" });
  popularSearches.AddRange(new string[] { "online dictionary", "orbitz", "online games", "office depot", "old navy", "oprah", "o2", "overstock.com", "office max", "orange" });
  popularSearches.AddRange(new string[] { "paris hilton", "pc world", "paypal", "poems", "people search", "pubmed", "pottery barn", "periodic table", "putty", "panasonic" });
  popularSearches.AddRange(new string[] { "quotes", "qvc", "quicktime", "qantas", "quizzes", "quotations", "quizilla", "quiz", "quick time", "qwest" });
  popularSearches.AddRange(new string[] { "recipes", "radio shack", "ryanair", "runescape", "real player", "ringtones", "royal mail", "real estate", "richards realm", "ryan air" });
  popularSearches.AddRange(new string[] { "spybot", "sears", "s", "song lyrics", "southwest airlines", "sony", "staples", "sams club", "suprnova", "search engines" });
  popularSearches.AddRange(new string[] { "tara reid", "target", "toys r us", "thanksgiving", "ticketmaster", "travelocity", "tesco", "the incredibles", "the oc", "thesaurus" });
  popularSearches.AddRange(new string[] { "ups", "united airlines", "usps", "usher", "used cars", "u2", "usa today", "ucas", "us airways", "urban outfitters" });
  popularSearches.AddRange(new string[] { "verizon", "verizon wireless", "victorias secret", "vodafone", "virgin", "victoria secret", "veterans day", "vnc", "virgin trains", "virgin mobile" });
  popularSearches.AddRange(new string[] { "weather", "walmart", "white pages", "weapons of mass destruction", "www.yahoo.com", "www.hotmail.com", "winrar", "winzip", "world of warcraft", "windows media player" });
  popularSearches.AddRange(new string[] { "xbox", "xm radio", "xanga", "x factor", "xvid", "x box", "xbox 2", "xbox cheats", "xbox live", "xanga.com" });
  popularSearches.AddRange(new string[] { "yahoo", "yellow pages", "yahoo.com", "yahoo mail", "yahoo maps", "yahoo games", "yahoo messenger", "yahoo groups", "yahoomail", "yell" });
  popularSearches.AddRange(new string[] { "zip codes", "zone alarm", "zip code", "zogby", "zonealarm", "zales", "zara", "zellers", "zdnet", "zip code finder" });
      }
    }
}
